package org.leaf.green.b2b

import grails.converters.JSON

class StockInAjaxController {

    def stockInAjaxService

    def purchaseDetail = { 
        render stockInAjaxService.purchaseDetail(params.int('id'))
    }

    def dealer = {
        render stockInAjaxService.dealer(params.int('id'))
    }

    def product = {
        render stockInAjaxService.product(params.int('id'))
    }

    def warehouse = {
        render stockInAjaxService.warehouse(params.term) as JSON
    }

    def purchaseDetailQuantity = {
        render stockInAjaxService.purchaseDetailQuantity(params.int('id').toLong())
    }
}
